package com.dianping.localcache;

public interface CacheManager<E> {

	E get(String url);

	boolean put(String url, E val);

	boolean remove(String url);

	void close();

	void clear();

	@SuppressWarnings("rawtypes")
	public static final CacheManager EMPTY = new CacheManager() {
		@Override
		public void close() {
		}

		@Override
		public Object get(String url) {
			return null;
		}

		@Override
		public boolean put(String url, Object val) {
			return false;
		}

		@Override
		public boolean remove(String url) {
			return false;
		}

		@Override
		public void clear() {
		}
	};
}
